package com.leet.meituan;

import java.util.Scanner;

public class Xiaomeiyonghuming {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        String[] s = new String[n];
        for(int i = 0; i < n; i++){
            String str = scanner.nextLine();
            if(isOK(str)){
                System.out.println("Accept");
            }else{
                System.out.println("Wrong");
            }
        }
    }
    static boolean isOK(String str){
        if(str.length() < 2) return false;
        char first = str.charAt(0);
        if(!isBig(first) && !isSmall(first)){
            return false;
        }
        boolean flag = false;
        for(int i = 0;i < str.length();i++){
            char c = str.charAt(i);
            if(!isBig(c) && !isSmall(c) && !isDigit(c)){
                return false;
            }
            if(isDigit(c)) flag = true;
        }
        if (flag == false) return false;
        return true;
    }
    static boolean isBig(char c){
        return (c >= 'A') && (c <= 'Z');
    }
    static boolean isSmall(char c){
        return (c >= 'a') && (c <= 'z');
    }
    static boolean isDigit(char c){
        return (c >= '0') && (c <= '9');
    }

}
